package com.hui.platform.falseworkapi.service.business.user.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hui.platform.falseworkapi.common.core.vo.PageData;
import com.hui.platform.falseworkapi.service.business.user.bo.TbUserBO;
import com.hui.platform.falseworkapi.service.business.user.dto.TbUserDTO;
import com.hui.platform.falseworkapi.service.business.user.dto.TbUserLoginDTO;
import com.hui.platform.falseworkapi.service.business.user.dto.TbUserSaveDTO;
import com.hui.platform.falseworkapi.service.business.user.entity.TbUser;

import java.util.List;

/**
 * 用户表 服务类
 *
 * @author hui
 * @since 2020-04-14
 */
public interface TbUserService extends IService<TbUser> {

    TbUserBO readById(Long id);

    List<TbUserBO> readByIds(List<Long> ids);

    List<TbUserBO> readList(TbUserDTO condition);

    PageData<TbUserBO> readPage(Long pageNum, Long pageSize, TbUserDTO condition);

    /**
     * 注册用户
     * @param dto
     * @return
     */
    Long createOne(TbUserSaveDTO dto);

    Long updateOne(Long id, TbUserSaveDTO dto);

    Long deleteById(Long id);

    List<Long> deleteByIds(List<Long> ids);

    //============================ this a fen ge xian ====================================

    /**
     * 用户登录
     * @param dto
     * @return
     */
    String userLogin(TbUserLoginDTO dto);
}
